<%@page import="com.mmy.domain.sys.TSysUser"%>
<!-- 引入地点 -->
<%@page import="com.mmy.domain.constzone.TConstZone"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
 <%
 	TSysUser tSysUser = (TSysUser)session.getAttribute("tSysUser");
   
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<jsp:include page="/WEB-INF/jsp/include1.jsp"></jsp:include>

	</head>
	<body>
		<div id="off-canvas-container" class="off-canvas-container">
		<jsp:include page="/WEB-INF/jsp/FrontHeader.jsp"></jsp:include>
		<div id="menu-back">
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<main class="at-padding-large-bottom">
			<article>
				<header class="bg-light at-padding-large-top at-padding-large-bottom at-margin-large-bottom">
					<div class="page-header container">
						<div class="row">
							<div class="span-5 col">
								<h1>收货地址管理</h1>
							</div>	
							
						 </div >
					</div>
				</header>
				<section class="container">
					
					
					<!-- 修改收货地址信息 -->
					<div class="information" >
					<form action="saveupdatesysaddress" class="info-form" name="createAddressForm" method="post" onSubmit="return createAddressSubmit(this);">
						<h4 class="info-h4">
							<i class="fa fa-caret-right" aria-hidden="true" ></i>修改收货地址信息
						</h4>
					<div class="input-container">
					<table class="info-table">
				
				<tr>
					<th><label for="AddressUserName">收货人姓名</label></th>
					<td colspan="2">
 <input type="hidden" name="AddressID" value="${dbSysAddress.getAddressID()}" readonly="readonly"/>
						<input type="text" id="AddressUserName" name="Name"  value="${dbSysAddress.getName()}" maxlength="16" required="required"/><span class="mustWrite">*</span>
					</td>
					<th><label for="AddressMobile">收货人手机号</label></th>
					<td colspan="2">
						<input type="text" id="AddressMobile" name="Mobile"  value="${dbSysAddress.getMobile()}" maxlength="16" onchange="checkPhone(this.value)" required="required"/><span class="mustWrite">*</span>
					</td>
				</tr>
<tr>
					
					<th><label for="LineZoneID">所属区域</label></th>
					<td colspan="5">		
						<select class=" input-select-vlign" id="LineZoneID" name="Province" emptyOption="false"  onchange="changeSelect(this,'getLevel4','level3','City')" >
					<option value="">---请选择---</option>
					<c:forEach var="lstZoneProvince" items="${lstZoneProvince}">
						<option value="${lstZoneProvince.getZoneID()}">${lstZoneProvince.getZoneName()}</option>
						</c:forEach>
						</select>
						<select class='input-select-vlign  City' name='City' emptyOption='false' onchange="changeSelect(this,'getLevel8','level4','ZoneID')">
						<option >---请选择---</option>
						</select> 	
	<select class='input-select-vlign ZoneID' name='ZoneID' emptyOption='false' >
							<option >---请选择---</option> 
						</select><span class="mustWrite">*</span>
					</td>
					
				</tr>
				<tr>
					
					<th><label for="Address">收货地址</label></th>
					<td colspan="5">
					<input type="text" id="Address" name="Address" maxlength="128"  value="${dbSysAddress.getAddress()}"  required="required"/><span class="mustWrite">*</span>
					</td>
					
				</tr>
				<tr>
				<th><label for="AddressType">地址类型</label></th>
				<td colspan="2">
			<select class="select-height" id="AddressType" name="Type"  required="required">
						<option value="1" <c:if test="${dbSysAddress.getType()==1}"> selected="selected"</c:if>>家</option>
					<option value="2" <c:if test="${dbSysAddress.getType()==2}"> selected="selected"</c:if>>学校</option>
					<option value="3" <c:if test="${dbSysAddress.getType()==3}"> selected="selected"</c:if>>公司</option>
					<option value="4" <c:if test="${dbSysAddress.getType()==4}"> selected="selected"</c:if>>其他</option>
						</select>
					<span class="mustWrite">*</span>
					</td>
					<th><label for="AddressPostcode">邮编</label></th>
					<td colspan="2">
					<input type="text" id="AddressPostcode" name="Postcode" maxlength="6" value="${dbSysAddress.getPostcode()}" required="required"/><span class="mustWrite">*</span>
					</td>
					</tr>
				<tr>
					<th><label for="MemberMemo">备注</label></th>
					<td colspan="5">
						<textarea  id="MemberMemo" maxlength="256" name="Memo"> ${dbSysAddresss.getMemo()}</textarea>
					</td>
					
				</tr>
				
			</table>
			<center>
				<input type="submit" class="btn" value="保存" />
				<input type="button" class="btn" value="返回" onclick="rehidder()"/>
			</center> 
			</div>
			</form>
			</div>
			</section>
			</article>
			</main>
			<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main End -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</div>
		<jsp:include page="/WEB-INF/jsp/Footer.jsp"></jsp:include>
	</div>
	<!-- /st-container -->
	<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Script Embed Start -->
		<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- Main Slider -->
<jsp:include page="/WEB-INF/jsp/include2.jsp"></jsp:include>
		<script>
			new GridScrollFx( document.getElementById( 'news-grid' ), {
				viewportFactor : 0.4
			} );
		</script>
<script type="text/javascript">
 function checkPhone(phone) {
    if(!(/^1[3456789]\d{9}$/.test(phone))){ 
       var txt=  "用户手机号格式错误！";
	window.wxc.xcConfirm(txt, window.wxc.xcConfirm.typeEnum.error);
       
    } 
    }</script>
</body>

</html>